package cn.vc.wallet.feign.clients;

import cn.vc.basicmodule.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Random;

@FeignClient(value = "wallet-service", path = "/wallet/wallet")
public interface WalletClient {

    /**
     * 创建钱包
     * @param id 用户ID，同时作为钱包ID
     */
    @PostMapping()
    void createWallet(@RequestParam("id") Long id);
    /**
     * <h2>签到</h2>
     * @return cn.vc.basicmodule.entity.Result
     */
    @PostMapping("/signIn")
    Result<?> signIn();


    @DeleteMapping("/coincasting/{id}")
    void coinCasting(@PathVariable("id") Long id);

    /**
     * 扣除钻石
     */
    @PutMapping("/deduction")
    boolean diamondDeduction(@RequestParam("id") Long id, @RequestParam("diamond") Long diamond);

}
